package 作业;

import com.sun.xml.internal.ws.api.message.HeaderList;

import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Random;

public class zuoye1 {
    public static void main(String[] args) {
        List<String> l = new ArrayList<>();
        List<String> l2 = new ArrayList<>();
        String [] str ={"科特迪瓦","阿根廷","澳大利亚","塞尔维亚","荷兰","尼日利亚","日本", "美国","中国","新西兰","巴西","比利时","韩国","喀麦隆","洪都拉斯","意大利"};
        for(int i=0;i<str.length;i++) {
            l.add(str[i]);
        }
        while(true) {
            l2.clear();
            while(true) {
                int a = (int)(Math.random()*l.size());
                String s = l.get(a);
                l2.add(s);
                l.remove(a);
                if(l2.size()==4) {
                    for(String s2:l2) {
                        System.out.print(s2+"  ");
                    }
                    break;
                }
            }
            System.out.println();
            if(l.size()==0) {
                break;
            }
        }

    }
}
